package com.twu.biblioteca;

/**
 * Created by aswathik on 6/20/14.
 */
public class Login {
    private String userName;
    private String password;

    Login(String userName, String password) {
        this.userName = userName;
        this.password = password;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Login login = (Login) o;

        if (password != null ? !password.equals(login.password) : login.password != null) return false;
        if (userName != null ? !userName.equals(login.userName) : login.userName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = userName != null ? userName.hashCode() : 0;
        result = 31 * result + (password != null ? password.hashCode() : 0);
        return result;
    }
}
